<!DOCTYPE html>
<html lang="en">
<head>
	<metal charset="utf-8">
	<title>留言板</title>
	<link rel="stylesheet" type="text/css" href="view/index.css"/>
	<script type="text/javascript" src="view/index.js"></script>
</head>
<body>
<!-- 		<div class="box" id="box">
			<img src="images/2.jpg">
			<h1>留言列表</h1>
			<form action="?a=post" method="post" id='form' onsubmit="check()">
				
				<ul>
					<li>
						<p>* 称呼</p>
						<input type="text" name="name" id="name">
						<span id="no">请输入6-10位数字或字母</span>
					</li>
					<li>
						<p>* 邮箱</p>
						<input type="text" name="mail" id="mail">
						<span id="no">请输入正确的邮箱地址</span>
					</li>
					<li>
						<p>* 标题</p>
						<input type="text" name="title" id="title" style="width: 200px;">
						<span id="no">请不要超过50个字</span>
					</li>
					<li>
						<p>* 选个你中意的头像吧</p>
						<?php foreach($icons as $icon){?>
							<label>
							<input type="radio" name="icon" value="<?php  $icon;?>" checked="">
							<img src="<?php  $icon;?>" style="width:30px;height:30px;float:left;">
							</label>
						<?php } ?>						
						
					</li>
					<li style="height: 120px;">
						<p class="tail">* 详细内容</p>
						<textarea name="body">
							
						</textarea>
					</li>
					<li>
						<input type="submit" id='submit' value="提交">
					</li>
				</ul>
			</form>
		</div> -->
		
<div class="main">
		<img src="images/4.jpg" class="back">
		<h3>留言列表</h3>
		<p id="message">我要留言</p>	

		<div class="box" id="box">
			<img src="images/2.jpg">
			<!-- <h1>留言列表</h1> -->
			<form action="?a=post" method="post" id='form' onsubmit="check()">
				
				<ul>
					<li>
						<p>* 称呼</p>
						<input type="text" name="name" id="name">
						<!-- <span id="no">请输入6-10位数字或字母</span> -->
					</li>
					<li>
						<p>* 邮箱</p>
						<input type="text" name="mail" id="mail">
						<span id="no">请输入正确的邮箱地址</span>
					</li>
					<li>
						<p>* 标题</p>
						<input type="text" name="title" id="title" style="width: 200px;">
						<!-- <span id="no">请不要超过50个字</span> -->
					</li>
					<li>
						<p>* 选个你中意的头像吧</p>
						<?php foreach($icons as $icon){?>
							<label>
							<input type="radio" name="icon" value="<?php echo $icon;?>" checked="">
							<img src="<?php echo $icon;?>" style="width:30px;height:30px;float:left;">
							</label>
						<?php } ?>						
						
					</li>
					<li style="height: 120px;">
						<p class="tail">* 详细内容</p>
						<textarea name="body">
							
						</textarea>
					</li>
					<li>
						<input type="submit" id='submit' value="提交">
					</li>
				</ul>
			</form>
		</div>


	<div class="content_box">			
		<?php foreach ($db as $id => $d):?>
		<div class="content">
		 
			<div class="left">
				<h5 class="name">
					<?php  echo $d['name']; ?>
				</h5>
				<img src="<?php echo $d['icon'];?>" style="width: 100px;height: 100px;margin-left: 25px;">
				<span class="mailbox">
					<?php echo $d['mail']; ?>
				</span>	
			</div>
			<div class="right">
				<span class="time">
					发表于：
					<?php echo $d['time']; ?>
				</span>				
				<h4 class="title">
					<?php  echo $d['title']; ?>
				</h4>
					<br/>
				<p class="body">	
					<?php  echo $d['body']; ?>
				</p>

				<!-- <a class="dele" href="index.php?a=del&id=<?php  $id;?>">删除</a> -->
				<a class="dele" href="javascript:;" onclick="confirm('确定删除吗')?location.href='index.php?a=del&id=<?php  echo $id;?>':''">删除</a>
			</div>
		
		</div>
		<?php endforeach; ?>
	</div>



</div>
	
</body>
</html>